#include "ComboBox.h"
#include "Application.h"

namespace MiniWindow
{
	ComboBox::ComboBox()
	{}
	ComboBox::ComboBox(const String& text) :Control(text)
	{}
	ComboBox::ComboBox(const String& text, int left, int top, int width, int height) : Control(text, left, top, width, height)
	{}

	void ComboBox::Create()
	{
		DWORD style = WS_VISIBLE | WS_CHILD;
		if (!this->_enabled)
		{
			style |= WS_DISABLED;
		}
		this->_handle = CreateWindowEx(
			0
			, TEXT("COMBOBOX")
			, this->_text
			, style
			, this->_position.x
			, this->_position.y
			, this->_size.cx
			, this->_size.cy
			, (null == this->Parent() ? null : this->Parent()->Handle())
			, null
			, Application::GetInstance()
			, this);
		Control::Create();
	}
	void ComboBox::Destroy()
	{
		Control::Destroy();
	}
}